Skip to content

Conversation

@pcarleton
Copy link
Member

Potential fix for https://github.com/modelcontextprotocol/conformance/security/code-scanning/1

General fix:
Add an explicit permissions block to the workflow to restrict the GITHUB_TOKEN's access, using the narrowest set of permissions required.

Detailed fix:
Since this workflow only checks out code and runs node tasks (no publishing, no deployment, no pull-request modification), the minimal required permission is contents: read. This should be set near the top of the workflow, ideally at the root level, so it applies to all jobs.

Where/how to change:

  • Add the following block directly below the workflow's on: section (after line 5 or line 6):
permissions:
  contents: read

What's needed:

  • Just add a permissions key to the workflow; no imports or external changes are needed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

pcarleton and others added 2 commits November 3, 2025 16:42
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@pcarleton pcarleton changed the title Potential fix for code scanning alert no. 1: Workflow does not contain permissions add permissions to test github action Nov 4, 2025
@pcarleton pcarleton marked this pull request as ready for review November 4, 2025 15:29
@pcarleton pcarleton merged commit 05df535 into main Nov 4, 2025
4 checks passed
@pcarleton pcarleton deleted the alert-autofix-1 branch November 4, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants